# -*- coding = utf-8 -*-
# @Time : 2021/11/1 21:46
# @Author : JingTian
# @file : testXwlt.py
# @software : PyCharm

import xlwt
import re

print("save....")
book = xlwt.Workbook(encoding="utf-8", style_compression=0)  # 创建workbook对象
sheet = book.add_sheet('深圳二手车', cell_overwrite_ok=True)  # 创建工作表
col = ('车名', '年份', '行驶里程', '价格')
for x in range(0, 8):
    sheet.write(0, x, col[x])   # 列名
for x in range(0, 250):
    print("第%d条" % (x + 1))
    data = data_list[x]
    for j in range(0, 8):
        sheet.write(x + 1, j, data[j])      # 数据

book.save(save_path)   # 保存

















